STEP 2: Just like we can access any element in a list at its index, we can do the same in a 2D list.

A 2D list has rows and columns. We can access an element in the list by specifying its row and column.

  • Click on and drag Set Value at 2D Index indented inside main().
  • Change my_list to maze and change the number to the right of = sign from 0 to 2.
  • Change the first 0 to 3 and the second 0 to 1. (This will change the fourth row and second column.)

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)